<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__driver.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Driver<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__CO__STACK__CONFIG"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__STACK__CONFIG.html">Stack configuration</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CO__dataTypes"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__dataTypes.html">Basic definitions</a></td></tr>
<tr class="memdesc:group__CO__dataTypes"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target specific basic definitions and data types according to Misra C specification. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CO__CAN__Message__reception"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CAN__Message__reception.html">Reception of CAN messages</a></td></tr>
<tr class="memdesc:group__CO__CAN__Message__reception"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target specific definitions and description of CAN message reception. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CO__CAN__Message__transmission"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CAN__Message__transmission.html">Transmission of CAN messages</a></td></tr>
<tr class="memdesc:group__CO__CAN__Message__transmission"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target specific definitions and description of CAN message transmission. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CO__critical__sections"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__critical__sections.html">Critical sections</a></td></tr>
<tr class="memdesc:group__CO__critical__sections"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopenNode is designed to run in different threads, as described in <a href="index.html">README.md</a>. Threads are implemented differently in different systems. In microcontrollers threads are interrupts with different priorities, for example. It is necessary to protect sections, where different threads access to the same resource. In simple systems interrupts or scheduler may be temporary disabled between access to the shared resource. Otherwise mutexes or semaphores can be used. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__config_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__config_8h.html">CO_config.h</a></td></tr>
<tr class="memdesc:CO__config_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configuration macros for CANopenNode. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:CO__driver_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__driver_8h.html">CO_driver.h</a></td></tr>
<tr class="memdesc:CO__driver_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interface between CAN hardware and CANopenNode. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Complete CAN module object.  <a href="structCO__CANmodule__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga0e351c2972f6d8f2e08fb5ac21a833b8"><td class="memItemLeft" align="right" valign="top"><a id="ga0e351c2972f6d8f2e08fb5ac21a833b8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga0e351c2972f6d8f2e08fb5ac21a833b8">CO_VERSION_MAJOR</a>&#160;&#160;&#160;4</td></tr>
<tr class="memdesc:ga0e351c2972f6d8f2e08fb5ac21a833b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Major version number of CANopenNode. <br /></td></tr>
<tr class="separator:ga0e351c2972f6d8f2e08fb5ac21a833b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac3f110c1dd3cfc2b994b5c20d1c6ace"><td class="memItemLeft" align="right" valign="top"><a id="gaac3f110c1dd3cfc2b994b5c20d1c6ace"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gaac3f110c1dd3cfc2b994b5c20d1c6ace">CO_VERSION_MINOR</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:gaac3f110c1dd3cfc2b994b5c20d1c6ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minor version number of CANopenNode. <br /></td></tr>
<tr class="separator:gaac3f110c1dd3cfc2b994b5c20d1c6ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa84189910b720ce18c8d83aab405d86"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gaaa84189910b720ce18c8d83aab405d86">CO_errinfo</a>(CANmodule,  err)</td></tr>
<tr class="memdesc:gaaa84189910b720ce18c8d83aab405d86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for passing additional information about error.  <a href="group__CO__driver.html#gaaa84189910b720ce18c8d83aab405d86">More...</a><br /></td></tr>
<tr class="separator:gaaa84189910b720ce18c8d83aab405d86"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga01dd35ae53fd2209ceccabdc8bf8dd06"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06">CO_Default_CAN_ID_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a335d0f6204819d267ba396b715f66ead">CO_CAN_ID_NMT_SERVICE</a> = 0x000, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a0ba8a628aa1a873a21820070261c2783">CO_CAN_ID_GFC</a> = 0x001, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a7a8486aaf2f35eb83c6ca690d0cdce06">CO_CAN_ID_SYNC</a> = 0x080, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a94ffef8babcef5b807c5f8c865ef7666">CO_CAN_ID_EMERGENCY</a> = 0x080, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06ab2e20e54189f5cb565e80b05eb8c4931">CO_CAN_ID_TIME</a> = 0x100, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06aefe4dd6630902d36173b81c106a813bc">CO_CAN_ID_SRDO_1</a> = 0x0FF, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a848f2bdb085bc3a342400a6b43c37f82">CO_CAN_ID_TPDO_1</a> = 0x180, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a0ab4be02961987ad817a99a4ef379517">CO_CAN_ID_RPDO_1</a> = 0x200, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06acb90f0dab2e31982df1bebae6dd02e4b">CO_CAN_ID_TPDO_2</a> = 0x280, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a60081a7b09921c6bfce3762a3dd4e49f">CO_CAN_ID_RPDO_2</a> = 0x300, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a83b73730655607582d1dabc8f78f7ca4">CO_CAN_ID_TPDO_3</a> = 0x380, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06ad634b89f227db86bc8c633dda327e5fb">CO_CAN_ID_RPDO_3</a> = 0x400, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06abe92c9f7938ad6566e8aa010ab6f5cae">CO_CAN_ID_TPDO_4</a> = 0x480, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06afec9dfa33a34beef50c434e5cde68c6b">CO_CAN_ID_RPDO_4</a> = 0x500, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a3c84d92ad004cfc04e398193b742d30c">CO_CAN_ID_SDO_SRV</a> = 0x580, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06acfe8640033d9668fafc63aa81d68ede5">CO_CAN_ID_SDO_CLI</a> = 0x600, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a0cfd21623475a1a8522b30b8b16d9874">CO_CAN_ID_HEARTBEAT</a> = 0x700, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06a4a62af7fb0b8768e57945a558a0ceee4">CO_CAN_ID_LSS_SLV</a> = 0x7E4, 
<a class="el" href="group__CO__driver.html#gga01dd35ae53fd2209ceccabdc8bf8dd06ad7d16ed89e513b035104e4b2634ce287">CO_CAN_ID_LSS_MST</a> = 0x7E5
<br />
 }</td></tr>
<tr class="memdesc:ga01dd35ae53fd2209ceccabdc8bf8dd06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default CANopen identifiers.  <a href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06">More...</a><br /></td></tr>
<tr class="separator:ga01dd35ae53fd2209ceccabdc8bf8dd06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6c5539afb3a95af43f5477d904607426"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga6c5539afb3a95af43f5477d904607426">CO_CAN_ERR_status_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a725e4fe057c2f9d222850686a76c724d">CO_CAN_ERRTX_WARNING</a> = 0x0001, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a85d05e861dc03e256dccf977ae16ad6e">CO_CAN_ERRTX_PASSIVE</a> = 0x0002, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426ae58aa7d0eb5d13630f858a3869f0ee7d">CO_CAN_ERRTX_BUS_OFF</a> = 0x0004, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426ad6fba8a27d82774f53812d3a49655d12">CO_CAN_ERRTX_OVERFLOW</a> = 0x0008, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426ac0b993c7786f41a8c73ad0339124881b">CO_CAN_ERRTX_PDO_LATE</a> = 0x0080, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a6df88a8a296eb4addc12d9136c0566b0">CO_CAN_ERRRX_WARNING</a> = 0x0100, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a51494ad0df1e2de6d9395f1803c4b233">CO_CAN_ERRRX_PASSIVE</a> = 0x0200, 
<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a714a0b9c0978ffde5f138a81880a1fdd">CO_CAN_ERRRX_OVERFLOW</a> = 0x0800, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga6c5539afb3a95af43f5477d904607426a5ad44f86d5691f2bc809f722364516e0">CO_CAN_ERR_WARN_PASSIVE</a> = 0x0303
<br />
 }</td></tr>
<tr class="memdesc:ga6c5539afb3a95af43f5477d904607426"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN error status bitmasks.  <a href="group__CO__driver.html#ga6c5539afb3a95af43f5477d904607426">More...</a><br /></td></tr>
<tr class="separator:ga6c5539afb3a95af43f5477d904607426"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cb2d3466eb0c6d267f3b5ff1a0d9532"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532aff1c3e9fd4bf65e6757b020f752cdac8">CO_ERROR_NO</a> = 0, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a3e78d588c0e21630c9cb7b43bfda3dae">CO_ERROR_ILLEGAL_ARGUMENT</a> = -1, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a2f07295c4c6539c2b390db2d7c351267">CO_ERROR_OUT_OF_MEMORY</a> = -2, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a129c7141c52ae59d37a2fff163fec600">CO_ERROR_TIMEOUT</a> = -3, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a0214308865e83b8c21de7317b3070097">CO_ERROR_ILLEGAL_BAUDRATE</a> = -4, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532ab0746d0801a99639077b325594b347b5">CO_ERROR_RX_OVERFLOW</a> = -5, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a7e4cefeb35775754c87cf6a559f1bbd9">CO_ERROR_RX_PDO_OVERFLOW</a> = -6, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a3e40e8440a8480c413d3ff724b875de4">CO_ERROR_RX_MSG_LENGTH</a> = -7, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a4829a460cbba557a2ff7f52bd912aa65">CO_ERROR_RX_PDO_LENGTH</a> = -8, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a757b4d226a3e00a9e2543cf21833d46f">CO_ERROR_TX_OVERFLOW</a> = -9, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a48993dc18698738d168071b4f4c3d244">CO_ERROR_TX_PDO_WINDOW</a> = -10, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a6f07e7c21acde035b561edc7f55edb89">CO_ERROR_TX_UNCONFIGURED</a> = -11, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a737e67c9f8d3ca882a3cba852153c1f3">CO_ERROR_OD_PARAMETERS</a> = -12, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532aa053301213d13670e9af7d31abc1ee48">CO_ERROR_DATA_CORRUPT</a> = -13, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a25eaff6474c6bc2aae67b1e7c7a35109">CO_ERROR_CRC</a> = -14, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532ab47ecc1b08463eb986fd29c187096343">CO_ERROR_TX_BUSY</a> = -15, 
<br />
&#160;&#160;<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a07457c9c6eda89fc0260e6d7e431424c">CO_ERROR_WRONG_NMT_STATE</a> = -16, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a46d81c922ecbaf8f136626725ad8399d">CO_ERROR_SYSCALL</a> = -17, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532a57f1c4d2d960ab2550669a1c5ebbf4e1">CO_ERROR_INVALID_STATE</a> = -18, 
<a class="el" href="group__CO__driver.html#gga1cb2d3466eb0c6d267f3b5ff1a0d9532ac7a6f0554ae52997b88a97b46a16e5a3">CO_ERROR_NODE_ID_UNCONFIGURED_LSS</a> = -19
<br />
 }</td></tr>
<tr class="memdesc:ga1cb2d3466eb0c6d267f3b5ff1a0d9532"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return values of some CANopen functions.  <a href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">More...</a><br /></td></tr>
<tr class="separator:ga1cb2d3466eb0c6d267f3b5ff1a0d9532"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga88ef52baae169a80e4c2f2cb93b33747"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga88ef52baae169a80e4c2f2cb93b33747">CO_CANsetConfigurationMode</a> (void *CANptr)</td></tr>
<tr class="memdesc:ga88ef52baae169a80e4c2f2cb93b33747"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request CAN configuration (stopped) mode and <em>wait</em> until it is set.  <a href="group__CO__driver.html#ga88ef52baae169a80e4c2f2cb93b33747">More...</a><br /></td></tr>
<tr class="separator:ga88ef52baae169a80e4c2f2cb93b33747"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad654edfa651bf7b68263913786697200"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gad654edfa651bf7b68263913786697200">CO_CANsetNormalMode</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule)</td></tr>
<tr class="memdesc:gad654edfa651bf7b68263913786697200"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request CAN normal (operational) mode and <em>wait</em> until it is set.  <a href="group__CO__driver.html#gad654edfa651bf7b68263913786697200">More...</a><br /></td></tr>
<tr class="separator:gad654edfa651bf7b68263913786697200"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a1131813110529494cee5e27c0bf28d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga3a1131813110529494cee5e27c0bf28d">CO_CANmodule_init</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule, void *CANptr, <a class="el" href="structCO__CANrx__t.html">CO_CANrx_t</a> rxArray[], <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> rxSize, <a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a> txArray[], <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> txSize, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANbitRate)</td></tr>
<tr class="memdesc:ga3a1131813110529494cee5e27c0bf28d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CAN module object.  <a href="group__CO__driver.html#ga3a1131813110529494cee5e27c0bf28d">More...</a><br /></td></tr>
<tr class="separator:ga3a1131813110529494cee5e27c0bf28d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6f60f9da27dda0c9b3950c4e96bd687"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gac6f60f9da27dda0c9b3950c4e96bd687">CO_CANmodule_disable</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule)</td></tr>
<tr class="memdesc:gac6f60f9da27dda0c9b3950c4e96bd687"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch off CANmodule.  <a href="group__CO__driver.html#gac6f60f9da27dda0c9b3950c4e96bd687">More...</a><br /></td></tr>
<tr class="separator:gac6f60f9da27dda0c9b3950c4e96bd687"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25ee22cd2e3a2f3bb49990e8bc3076b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga25ee22cd2e3a2f3bb49990e8bc3076b0">CO_CANrxBufferInit</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> index, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> mask, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> rtr, void *object, void(*<a class="el" href="group__CO__CAN__Message__reception.html#ga23168979123a5ca8a87d49307eb2990e">CANrx_callback</a>)(void *object, void *message))</td></tr>
<tr class="memdesc:ga25ee22cd2e3a2f3bb49990e8bc3076b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure CAN message receive buffer.  <a href="group__CO__driver.html#ga25ee22cd2e3a2f3bb49990e8bc3076b0">More...</a><br /></td></tr>
<tr class="separator:ga25ee22cd2e3a2f3bb49990e8bc3076b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01e2ee79e7e3a8b321dac831e7e00976"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga01e2ee79e7e3a8b321dac831e7e00976">CO_CANtxBufferInit</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> index, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> rtr, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> noOfBytes, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> syncFlag)</td></tr>
<tr class="memdesc:ga01e2ee79e7e3a8b321dac831e7e00976"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure CAN message transmit buffer.  <a href="group__CO__driver.html#ga01e2ee79e7e3a8b321dac831e7e00976">More...</a><br /></td></tr>
<tr class="separator:ga01e2ee79e7e3a8b321dac831e7e00976"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4664a9f5d547cb0605a9e929fb079f2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e">CO_CANsend</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule, <a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a> *buffer)</td></tr>
<tr class="memdesc:ga4664a9f5d547cb0605a9e929fb079f2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send CAN message.  <a href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e">More...</a><br /></td></tr>
<tr class="separator:ga4664a9f5d547cb0605a9e929fb079f2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbeac85cbf513162b11fc3d0717b0753"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gabbeac85cbf513162b11fc3d0717b0753">CO_CANclearPendingSyncPDOs</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule)</td></tr>
<tr class="memdesc:gabbeac85cbf513162b11fc3d0717b0753"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all synchronous TPDOs from CAN module transmit buffers.  <a href="group__CO__driver.html#gabbeac85cbf513162b11fc3d0717b0753">More...</a><br /></td></tr>
<tr class="separator:gabbeac85cbf513162b11fc3d0717b0753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga066c6742f75b2daac585735ffd6c9928"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga066c6742f75b2daac585735ffd6c9928">CO_CANmodule_process</a> (<a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANmodule)</td></tr>
<tr class="memdesc:ga066c6742f75b2daac585735ffd6c9928"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process can module - verify CAN errors.  <a href="group__CO__driver.html#ga066c6742f75b2daac585735ffd6c9928">More...</a><br /></td></tr>
<tr class="separator:ga066c6742f75b2daac585735ffd6c9928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27a4052f87c60cf2df472378689c2ef9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga27a4052f87c60cf2df472378689c2ef9">CO_getUint8</a> (const void *buf)</td></tr>
<tr class="memdesc:ga27a4052f87c60cf2df472378689c2ef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get uint8_t value from memory buffer.  <a href="group__CO__driver.html#ga27a4052f87c60cf2df472378689c2ef9">More...</a><br /></td></tr>
<tr class="separator:ga27a4052f87c60cf2df472378689c2ef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6590fe7a05ecb4b81ee3d7e233274ea4"><td class="memItemLeft" align="right" valign="top"><a id="ga6590fe7a05ecb4b81ee3d7e233274ea4"></a>
static <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga6590fe7a05ecb4b81ee3d7e233274ea4">CO_getUint16</a> (const void *buf)</td></tr>
<tr class="memdesc:ga6590fe7a05ecb4b81ee3d7e233274ea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get uint16_t value from memory buffer, see <a class="el" href="group__CO__driver.html#ga27a4052f87c60cf2df472378689c2ef9">CO_getUint8</a>. <br /></td></tr>
<tr class="separator:ga6590fe7a05ecb4b81ee3d7e233274ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21cd9e2391f276b908bcde5769e967ed"><td class="memItemLeft" align="right" valign="top"><a id="ga21cd9e2391f276b908bcde5769e967ed"></a>
static <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga21cd9e2391f276b908bcde5769e967ed">CO_getUint32</a> (const void *buf)</td></tr>
<tr class="memdesc:ga21cd9e2391f276b908bcde5769e967ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get uint32_t value from memory buffer, see <a class="el" href="group__CO__driver.html#ga27a4052f87c60cf2df472378689c2ef9">CO_getUint8</a>. <br /></td></tr>
<tr class="separator:ga21cd9e2391f276b908bcde5769e967ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga61de0908305223a0a7949e184cc1d644"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga61de0908305223a0a7949e184cc1d644">CO_setUint8</a> (void *buf, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> value)</td></tr>
<tr class="memdesc:ga61de0908305223a0a7949e184cc1d644"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write uint8_t value into memory buffer.  <a href="group__CO__driver.html#ga61de0908305223a0a7949e184cc1d644">More...</a><br /></td></tr>
<tr class="separator:ga61de0908305223a0a7949e184cc1d644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf74a6b7343bc9d6efd5ec5d9d9f965fb"><td class="memItemLeft" align="right" valign="top"><a id="gaf74a6b7343bc9d6efd5ec5d9d9f965fb"></a>
static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#gaf74a6b7343bc9d6efd5ec5d9d9f965fb">CO_setUint16</a> (void *buf, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> value)</td></tr>
<tr class="memdesc:gaf74a6b7343bc9d6efd5ec5d9d9f965fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write uint16_t value into memory buffer, see <a class="el" href="group__CO__driver.html#ga61de0908305223a0a7949e184cc1d644">CO_setUint8</a>. <br /></td></tr>
<tr class="separator:gaf74a6b7343bc9d6efd5ec5d9d9f965fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9dbc7193fbd875503e0b3b34ea22434e"><td class="memItemLeft" align="right" valign="top"><a id="ga9dbc7193fbd875503e0b3b34ea22434e"></a>
static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__driver.html#ga9dbc7193fbd875503e0b3b34ea22434e">CO_setUint32</a> (void *buf, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> value)</td></tr>
<tr class="memdesc:ga9dbc7193fbd875503e0b3b34ea22434e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write uint32_t value into memory buffer, see <a class="el" href="group__CO__driver.html#ga61de0908305223a0a7949e184cc1d644">CO_setUint8</a>. <br /></td></tr>
<tr class="separator:ga9dbc7193fbd875503e0b3b34ea22434e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Interface between CAN hardware and CANopenNode.</p>
<p>CANopenNode is designed for speed and portability. It runs efficiently on devices from simple 16-bit microcontrollers to PC computers. It can run in multiple threads. Reception of CAN messages is pre-processed with very fast functions. Time critical objects, such as PDO or SYNC are processed in real-time thread and other objects are processed in normal thread. See Flowchart in <a href="index.html">README.md</a> for more information.</p>
<p><a class="anchor" id="CO_obj"></a></p><h4>CANopenNode Object</h4>
<p>CANopenNode is implemented as a collection of different objects, for example SDO, SYNC, Emergency, PDO, NMT, Heartbeat, etc. Code is written in C language and tries to be object oriented. So each CANopenNode Object is implemented in a pair of .h/.c files. It basically contains a structure with all necessary variables and some functions which operates on it. CANopenNode Object is usually connected with one or more CAN receive or transmit Message Objects. (CAN message Object is a CAN message with specific 11-bit CAN identifier (usually one fixed or a range).)</p>
<h4>Hardware interface of CANopenNode</h4>
<p>It consists of minimum three files:</p><ul>
<li><b><a class="el" href="CO__driver_8h.html" title="Interface between CAN hardware and CANopenNode.">CO_driver.h</a></b> file declares common functions. This file is part of the CANopenNode. It is included from each .c file from CANopenNode.</li>
<li><b><a class="el" href="CO__driver__target_8h.html" title="Linux socketCAN specific definitions for CANopenNode.">CO_driver_target.h</a></b> file declares microcontroller specific type declarations and defines some macros, which are necessary for CANopenNode. This file is included from <a class="el" href="CO__driver_8h.html" title="Interface between CAN hardware and CANopenNode.">CO_driver.h</a>.</li>
<li><b>CO_driver.c</b> file defines functions declared in <a class="el" href="CO__driver_8h.html" title="Interface between CAN hardware and CANopenNode.">CO_driver.h</a>.</li>
</ul>
<p><b><a class="el" href="CO__driver__target_8h.html" title="Linux socketCAN specific definitions for CANopenNode.">CO_driver_target.h</a></b> and <b>CO_driver.c</b> files are specific for each different microcontroller and are not part of CANopenNode. There are separate projects for different microcontrollers, which usually include CANopenNode as a git submodule. CANopenNode only includes those two files in the <code>example</code> directory and they are basically empty. It should be possible to compile the <code>CANopenNode/example</code> on any system, however compiled program is not usable. <a class="el" href="CO__driver_8h.html" title="Interface between CAN hardware and CANopenNode.">CO_driver.h</a> contains documentation for all necessary macros, types and functions.</p>
<p>See <a href="https://github.com/CANopenNode/CANopenNode/wiki">CANopenNode/Wiki</a> for a known list of available implementations of CANopenNode on different systems and microcontrollers. Everybody is welcome to extend the list with a link to his own implementation.</p>
<p>Implementation of the hardware interface for specific microcontroller is not always an easy task. For reliable and efficient operation it is necessary to know some parts of the target microcontroller in detail (for example threads (or interrupts), CAN module, etc.). </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gaaa84189910b720ce18c8d83aab405d86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaa84189910b720ce18c8d83aab405d86">&#9670;&nbsp;</a></span>CO_errinfo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CO_errinfo</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">CANmodule, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">err&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro for passing additional information about error. </p>
<p>This macro is called from several CANopen init functions, which returns <a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>.</p>
<p><a class="el" href="CO__driver__target_8h.html" title="Linux socketCAN specific definitions for CANopenNode.">CO_driver_target.h</a> may implement this macro. Usually macro only sets CANmodule-&gt;errinfo to err. Application may then use CANmodule-&gt;errinfo to determine the reason of failure. errinfo must be type of int32_t. By default macro does not record anything.</p>
<p>CO_errinfo is called in following <a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> reasons:</p><ul>
<li>'CO_ERROR_OD_PARAMETERS' - Index of erroneous OD parameter. </li>
</ul>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga01dd35ae53fd2209ceccabdc8bf8dd06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01dd35ae53fd2209ceccabdc8bf8dd06">&#9670;&nbsp;</a></span>CO_Default_CAN_ID_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06">CO_Default_CAN_ID_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default CANopen identifiers. </p>
<p>Default CANopen identifiers for CANopen communication objects. Same as 11-bit addresses of CAN messages. These are default identifiers and can be changed in CANopen. Especially PDO identifiers are configured in PDO linking phase of the CANopen network configuration. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a335d0f6204819d267ba396b715f66ead"></a>CO_CAN_ID_NMT_SERVICE&#160;</td><td class="fielddoc"><p>0x000, Network management </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a0ba8a628aa1a873a21820070261c2783"></a>CO_CAN_ID_GFC&#160;</td><td class="fielddoc"><p>0x001, Global fail-safe command </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a7a8486aaf2f35eb83c6ca690d0cdce06"></a>CO_CAN_ID_SYNC&#160;</td><td class="fielddoc"><p>0x080, Synchronous message </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a94ffef8babcef5b807c5f8c865ef7666"></a>CO_CAN_ID_EMERGENCY&#160;</td><td class="fielddoc"><p>0x080, Emergency messages (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06ab2e20e54189f5cb565e80b05eb8c4931"></a>CO_CAN_ID_TIME&#160;</td><td class="fielddoc"><p>0x100, Time message </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06aefe4dd6630902d36173b81c106a813bc"></a>CO_CAN_ID_SRDO_1&#160;</td><td class="fielddoc"><p>0x0FF, Default SRDO1 (+2*nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a848f2bdb085bc3a342400a6b43c37f82"></a>CO_CAN_ID_TPDO_1&#160;</td><td class="fielddoc"><p>0x180, Default TPDO1 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a0ab4be02961987ad817a99a4ef379517"></a>CO_CAN_ID_RPDO_1&#160;</td><td class="fielddoc"><p>0x200, Default RPDO1 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06acb90f0dab2e31982df1bebae6dd02e4b"></a>CO_CAN_ID_TPDO_2&#160;</td><td class="fielddoc"><p>0x280, Default TPDO2 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a60081a7b09921c6bfce3762a3dd4e49f"></a>CO_CAN_ID_RPDO_2&#160;</td><td class="fielddoc"><p>0x300, Default RPDO2 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a83b73730655607582d1dabc8f78f7ca4"></a>CO_CAN_ID_TPDO_3&#160;</td><td class="fielddoc"><p>0x380, Default TPDO3 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06ad634b89f227db86bc8c633dda327e5fb"></a>CO_CAN_ID_RPDO_3&#160;</td><td class="fielddoc"><p>0x400, Default RPDO3 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06abe92c9f7938ad6566e8aa010ab6f5cae"></a>CO_CAN_ID_TPDO_4&#160;</td><td class="fielddoc"><p>0x480, Default TPDO4 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06afec9dfa33a34beef50c434e5cde68c6b"></a>CO_CAN_ID_RPDO_4&#160;</td><td class="fielddoc"><p>0x500, Default RPDO5 (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a3c84d92ad004cfc04e398193b742d30c"></a>CO_CAN_ID_SDO_SRV&#160;</td><td class="fielddoc"><p>0x580, SDO response from server (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06acfe8640033d9668fafc63aa81d68ede5"></a>CO_CAN_ID_SDO_CLI&#160;</td><td class="fielddoc"><p>0x600, SDO request from client (+nodeID) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a0cfd21623475a1a8522b30b8b16d9874"></a>CO_CAN_ID_HEARTBEAT&#160;</td><td class="fielddoc"><p>0x700, Heartbeat message </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06a4a62af7fb0b8768e57945a558a0ceee4"></a>CO_CAN_ID_LSS_SLV&#160;</td><td class="fielddoc"><p>0x7E4, LSS response from slave </p>
</td></tr>
<tr><td class="fieldname"><a id="gga01dd35ae53fd2209ceccabdc8bf8dd06ad7d16ed89e513b035104e4b2634ce287"></a>CO_CAN_ID_LSS_MST&#160;</td><td class="fielddoc"><p>0x7E5, LSS request from master </p>
</td></tr>
</table>

</div>
</div>
<a id="ga6c5539afb3a95af43f5477d904607426"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6c5539afb3a95af43f5477d904607426">&#9670;&nbsp;</a></span>CO_CAN_ERR_status_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__driver.html#ga6c5539afb3a95af43f5477d904607426">CO_CAN_ERR_status_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CAN error status bitmasks. </p>
<p>CAN warning level is reached, if CAN transmit or receive error counter is more or equal to 96. CAN passive level is reached, if counters are more or equal to 128. Transmitter goes in error state 'bus off' if transmit error counter is more or equal to 256. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a725e4fe057c2f9d222850686a76c724d"></a>CO_CAN_ERRTX_WARNING&#160;</td><td class="fielddoc"><p>0x0001, CAN transmitter warning </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a85d05e861dc03e256dccf977ae16ad6e"></a>CO_CAN_ERRTX_PASSIVE&#160;</td><td class="fielddoc"><p>0x0002, CAN transmitter passive </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426ae58aa7d0eb5d13630f858a3869f0ee7d"></a>CO_CAN_ERRTX_BUS_OFF&#160;</td><td class="fielddoc"><p>0x0004, CAN transmitter bus off </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426ad6fba8a27d82774f53812d3a49655d12"></a>CO_CAN_ERRTX_OVERFLOW&#160;</td><td class="fielddoc"><p>0x0008, CAN transmitter overflow </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426ac0b993c7786f41a8c73ad0339124881b"></a>CO_CAN_ERRTX_PDO_LATE&#160;</td><td class="fielddoc"><p>0x0080, TPDO is outside sync window </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a6df88a8a296eb4addc12d9136c0566b0"></a>CO_CAN_ERRRX_WARNING&#160;</td><td class="fielddoc"><p>0x0100, CAN receiver warning </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a51494ad0df1e2de6d9395f1803c4b233"></a>CO_CAN_ERRRX_PASSIVE&#160;</td><td class="fielddoc"><p>0x0200, CAN receiver passive </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a714a0b9c0978ffde5f138a81880a1fdd"></a>CO_CAN_ERRRX_OVERFLOW&#160;</td><td class="fielddoc"><p>0x0800, CAN receiver overflow </p>
</td></tr>
<tr><td class="fieldname"><a id="gga6c5539afb3a95af43f5477d904607426a5ad44f86d5691f2bc809f722364516e0"></a>CO_CAN_ERR_WARN_PASSIVE&#160;</td><td class="fielddoc"><p>0x0303, combination </p>
</td></tr>
</table>

</div>
</div>
<a id="ga1cb2d3466eb0c6d267f3b5ff1a0d9532"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">&#9670;&nbsp;</a></span>CO_ReturnError_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return values of some CANopen functions. </p>
<p>If function was executed successfully it returns 0 otherwise it returns &lt;0. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532aff1c3e9fd4bf65e6757b020f752cdac8"></a>CO_ERROR_NO&#160;</td><td class="fielddoc"><p>Operation completed successfully. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a3e78d588c0e21630c9cb7b43bfda3dae"></a>CO_ERROR_ILLEGAL_ARGUMENT&#160;</td><td class="fielddoc"><p>Error in function arguments. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a2f07295c4c6539c2b390db2d7c351267"></a>CO_ERROR_OUT_OF_MEMORY&#160;</td><td class="fielddoc"><p>Memory allocation failed. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a129c7141c52ae59d37a2fff163fec600"></a>CO_ERROR_TIMEOUT&#160;</td><td class="fielddoc"><p>Function timeout. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a0214308865e83b8c21de7317b3070097"></a>CO_ERROR_ILLEGAL_BAUDRATE&#160;</td><td class="fielddoc"><p>Illegal baudrate passed to function <a class="el" href="group__CO__driver.html#ga3a1131813110529494cee5e27c0bf28d" title="Initialize CAN module object.">CO_CANmodule_init()</a> </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532ab0746d0801a99639077b325594b347b5"></a>CO_ERROR_RX_OVERFLOW&#160;</td><td class="fielddoc"><p>Previous message was not processed yet. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a7e4cefeb35775754c87cf6a559f1bbd9"></a>CO_ERROR_RX_PDO_OVERFLOW&#160;</td><td class="fielddoc"><p>previous PDO was not processed yet </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a3e40e8440a8480c413d3ff724b875de4"></a>CO_ERROR_RX_MSG_LENGTH&#160;</td><td class="fielddoc"><p>Wrong receive message length. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a4829a460cbba557a2ff7f52bd912aa65"></a>CO_ERROR_RX_PDO_LENGTH&#160;</td><td class="fielddoc"><p>Wrong receive PDO length. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a757b4d226a3e00a9e2543cf21833d46f"></a>CO_ERROR_TX_OVERFLOW&#160;</td><td class="fielddoc"><p>Previous message is still waiting, buffer full. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a48993dc18698738d168071b4f4c3d244"></a>CO_ERROR_TX_PDO_WINDOW&#160;</td><td class="fielddoc"><p>Synchronous TPDO is outside window. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a6f07e7c21acde035b561edc7f55edb89"></a>CO_ERROR_TX_UNCONFIGURED&#160;</td><td class="fielddoc"><p>Transmit buffer was not configured properly. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a737e67c9f8d3ca882a3cba852153c1f3"></a>CO_ERROR_OD_PARAMETERS&#160;</td><td class="fielddoc"><p>Error in Object Dictionary parameters. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532aa053301213d13670e9af7d31abc1ee48"></a>CO_ERROR_DATA_CORRUPT&#160;</td><td class="fielddoc"><p>Stored data are corrupt. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a25eaff6474c6bc2aae67b1e7c7a35109"></a>CO_ERROR_CRC&#160;</td><td class="fielddoc"><p>CRC does not match. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532ab47ecc1b08463eb986fd29c187096343"></a>CO_ERROR_TX_BUSY&#160;</td><td class="fielddoc"><p>Sending rejected because driver is busy. </p>
<p>Try again </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a07457c9c6eda89fc0260e6d7e431424c"></a>CO_ERROR_WRONG_NMT_STATE&#160;</td><td class="fielddoc"><p>Command can't be processed in current state. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a46d81c922ecbaf8f136626725ad8399d"></a>CO_ERROR_SYSCALL&#160;</td><td class="fielddoc"><p>Syscall failed. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532a57f1c4d2d960ab2550669a1c5ebbf4e1"></a>CO_ERROR_INVALID_STATE&#160;</td><td class="fielddoc"><p>Driver not ready. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1cb2d3466eb0c6d267f3b5ff1a0d9532ac7a6f0554ae52997b88a97b46a16e5a3"></a>CO_ERROR_NODE_ID_UNCONFIGURED_LSS&#160;</td><td class="fielddoc"><p>Node-id is in LSS unconfigured state. </p>
<p>If objects are handled properly, this may not be an error. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga88ef52baae169a80e4c2f2cb93b33747"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88ef52baae169a80e4c2f2cb93b33747">&#9670;&nbsp;</a></span>CO_CANsetConfigurationMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANsetConfigurationMode </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CANptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Request CAN configuration (stopped) mode and <em>wait</em> until it is set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANptr</td><td>Pointer to CAN device </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad654edfa651bf7b68263913786697200"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad654edfa651bf7b68263913786697200">&#9670;&nbsp;</a></span>CO_CANsetNormalMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANsetNormalMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Request CAN normal (operational) mode and <em>wait</em> until it is set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td><a class="el" href="structCO__CANmodule__t.html" title="Complete CAN module object.">CO_CANmodule_t</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3a1131813110529494cee5e27c0bf28d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3a1131813110529494cee5e27c0bf28d">&#9670;&nbsp;</a></span>CO_CANmodule_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_CANmodule_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CANptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANrx__t.html">CO_CANrx_t</a>&#160;</td>
          <td class="paramname"><em>rxArray</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>rxSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a>&#160;</td>
          <td class="paramname"><em>txArray</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>txSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANbitRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CAN module object. </p>
<p>Function must be called in the communication reset section. CAN module must be in Configuration Mode before.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">CANptr</td><td>Pointer to CAN device. </td></tr>
    <tr><td class="paramname">rxArray</td><td>Array for handling received CAN messages </td></tr>
    <tr><td class="paramname">rxSize</td><td>Size of the above array. Must be equal to number of receiving CAN objects. </td></tr>
    <tr><td class="paramname">txArray</td><td>Array for handling transmitting CAN messages </td></tr>
    <tr><td class="paramname">txSize</td><td>Size of the above array. Must be equal to number of transmitting CAN objects. </td></tr>
    <tr><td class="paramname">CANbitRate</td><td>Valid values are (in kbps): 10, 20, 50, 125, 250, 500, 800,<ol type="1">
<li>If value is illegal, bitrate defaults to 125.</li>
</ol>
</td></tr>
  </table>
  </dd>
</dl>
<p>Return <a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </p>

</div>
</div>
<a id="gac6f60f9da27dda0c9b3950c4e96bd687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac6f60f9da27dda0c9b3950c4e96bd687">&#9670;&nbsp;</a></span>CO_CANmodule_disable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANmodule_disable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Switch off CANmodule. </p>
<p>Call at program exit.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>CAN module object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga25ee22cd2e3a2f3bb49990e8bc3076b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga25ee22cd2e3a2f3bb49990e8bc3076b0">&#9670;&nbsp;</a></span>CO_CANrxBufferInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_CANrxBufferInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>ident</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>rtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object, void *message)&#160;</td>
          <td class="paramname"><em>CANrx_callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure CAN message receive buffer. </p>
<p>Function configures specific CAN receive buffer. It sets CAN identifier and connects buffer with specific object. Function must be called for each member in <em>rxArray</em> from <a class="el" href="structCO__CANmodule__t.html" title="Complete CAN module object.">CO_CANmodule_t</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object. </td></tr>
    <tr><td class="paramname">index</td><td>Index of the specific buffer in <em>rxArray</em>. </td></tr>
    <tr><td class="paramname">ident</td><td>11-bit standard CAN Identifier. If two or more CANrx buffers have the same <em>ident</em>, then buffer with lowest <em>index</em> has precedence and other CANrx buffers will be ignored. </td></tr>
    <tr><td class="paramname">mask</td><td>11-bit mask for identifier. Most usually set to 0x7FF. Received message (rcvMsg) will be accepted if the following condition is true: (((rcvMsgId ^ ident) &amp; mask) == 0). </td></tr>
    <tr><td class="paramname">rtr</td><td>If true, 'Remote Transmit Request' messages will be accepted. </td></tr>
    <tr><td class="paramname">object</td><td>CANopen object, to which buffer is connected. It will be used as an argument to CANrx_callback. Its type is (void), CANrx_callback will change its type back to the correct object type. </td></tr>
    <tr><td class="paramname">CANrx_callback</td><td>Pointer to function, which will be called, if received CAN message matches the identifier. It must be fast function.</td></tr>
  </table>
  </dd>
</dl>
<p>Return <a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO CO_ERROR_ILLEGAL_ARGUMENT or CO_ERROR_OUT_OF_MEMORY (not enough masks for configuration). </p>

</div>
</div>
<a id="ga01e2ee79e7e3a8b321dac831e7e00976"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01e2ee79e7e3a8b321dac831e7e00976">&#9670;&nbsp;</a></span>CO_CANtxBufferInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a>* CO_CANtxBufferInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>ident</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>rtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>noOfBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>syncFlag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure CAN message transmit buffer. </p>
<p>Function configures specific CAN transmit buffer. Function must be called for each member in <em>txArray</em> from <a class="el" href="structCO__CANmodule__t.html" title="Complete CAN module object.">CO_CANmodule_t</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object. </td></tr>
    <tr><td class="paramname">index</td><td>Index of the specific buffer in <em>txArray</em>. </td></tr>
    <tr><td class="paramname">ident</td><td>11-bit standard CAN Identifier. </td></tr>
    <tr><td class="paramname">rtr</td><td>If true, 'Remote Transmit Request' messages will be transmitted. </td></tr>
    <tr><td class="paramname">noOfBytes</td><td>Length of CAN message in bytes (0 to 8 bytes). </td></tr>
    <tr><td class="paramname">syncFlag</td><td>This flag bit is used for synchronous TPDO messages. If it is set, message will not be sent, if current time is outside synchronous window.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to CAN transmit message buffer. 8 bytes data array inside buffer should be written, before <a class="el" href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e" title="Send CAN message.">CO_CANsend()</a> function is called. Zero is returned in case of wrong arguments. </dd></dl>

</div>
</div>
<a id="ga4664a9f5d547cb0605a9e929fb079f2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4664a9f5d547cb0605a9e929fb079f2e">&#9670;&nbsp;</a></span>CO_CANsend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_CANsend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANtx__t.html">CO_CANtx_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send CAN message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object. </td></tr>
    <tr><td class="paramname">buffer</td><td>Pointer to transmit buffer, returned by <a class="el" href="group__CO__driver.html#ga01e2ee79e7e3a8b321dac831e7e00976" title="Configure CAN message transmit buffer.">CO_CANtxBufferInit()</a>. Data bytes must be written in buffer before function call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO, CO_ERROR_TX_OVERFLOW or CO_ERROR_TX_PDO_WINDOW (Synchronous TPDO is outside window). </dd></dl>

</div>
</div>
<a id="gabbeac85cbf513162b11fc3d0717b0753"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabbeac85cbf513162b11fc3d0717b0753">&#9670;&nbsp;</a></span>CO_CANclearPendingSyncPDOs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANclearPendingSyncPDOs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear all synchronous TPDOs from CAN module transmit buffers. </p>
<p>CANopen allows synchronous PDO communication only inside time between SYNC message and SYNC Window. If time is outside this window, new synchronous PDOs must not be sent and all pending sync TPDOs, which may be on CAN TX buffers, may optionally be cleared.</p>
<p>This function checks (and aborts transmission if necessary) CAN TX buffers when it is called. Function should be called by the stack in the moment, when SYNC time was just passed out of synchronous window.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga066c6742f75b2daac585735ffd6c9928"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga066c6742f75b2daac585735ffd6c9928">&#9670;&nbsp;</a></span>CO_CANmodule_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANmodule_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANmodule</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process can module - verify CAN errors. </p>
<p>Function must be called cyclically. It should calculate CANerrorStatus bitfield for CAN errors defined in <a class="el" href="group__CO__driver.html#ga6c5539afb3a95af43f5477d904607426">CO_CAN_ERR_status_t</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANmodule</td><td>This object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga27a4052f87c60cf2df472378689c2ef9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27a4052f87c60cf2df472378689c2ef9">&#9670;&nbsp;</a></span>CO_getUint8()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> CO_getUint8 </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get uint8_t value from memory buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Memory buffer to get value from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Value </dd></dl>

</div>
</div>
<a id="ga61de0908305223a0a7949e184cc1d644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga61de0908305223a0a7949e184cc1d644">&#9670;&nbsp;</a></span>CO_setUint8()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> CO_setUint8 </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write uint8_t value into memory buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Memory buffer. </td></tr>
    <tr><td class="paramname">value</td><td>Value to be written into buf.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes written. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
